package com.zr.gdms.serviceimpl;

import java.util.List;

import com.zr.gdms.dao.CourseDaoZYH;
import com.zr.gdms.daoimpl.CourseDaoImplZYH;
import com.zr.gdms.model.Application;
import com.zr.gdms.service.CourseService;

import net.sf.json.JSONArray;
/**
 * 课题管理服务实现层
 * @author 张云辉
 *
 */
public class CourseServiceImpl implements CourseService{

	CourseDaoZYH cdao = new CourseDaoImplZYH();

	@Override
	public boolean AddCourseByTime(String apptype, String appcontent, int tid,String appstate) {
		
		return cdao.AddCourseByTime(apptype, appcontent, tid,appstate);
	}

	@Override
	public JSONArray findAllCourseByTid(int tid) {
		
		return cdao.getAllCourseByTid(tid);
	}

	@Override
	public List<Application> findCourseFromApByUid(int uid) {
		
		return cdao.getCourseFromApByUid(uid);
	}

	@Override
	public int findTidByUid(int uid) {
		
		return cdao.getTidByUid(uid);
	}

	@Override
	public boolean delCourseByAppid(int appid) {
		
		return cdao.delCourseByAppid(appid);
	}

	@Override
	public boolean UpdateCourseByAppid(int appid, String appcontent) {
		
		return cdao.UpdateCourseByAppid(appid, appcontent);
	}

	@Override
	public boolean addScoreBySid(int sid, int score) {
		
		return cdao.addScoreBySid(sid, score);
	}

	@Override
	public JSONArray getScoreByTid(int tid) {
		
		return cdao.getScoreByTid(tid);
	}
	
}
